#include "StdAfx.h"
#include "SubStructure.h"
#include "BulletMoveLine.h"

BulletMoveLine::BulletMoveLine()
{
}

BulletMove* BulletMoveLine::Instance()
{
	if(_p_this == NULL)
	{
		_p_this = new BulletMoveLine();
	}
	return _p_this;
}

D3DXVECTOR2 BulletMoveLine::MoveCalc(D3DXVECTOR2 pos, Move_info* moveinfo, UINT id, DWORD randid)
{
	pos += moveinfo->Move_Vel;
	moveinfo->Move_Vel += moveinfo->Move_Acc;
	if(randid != 0)
	{
		pos.x += Rseed->getrandAsFLOAT(randid);
		pos.y += Rseed->getrandAsFLOAT(100-randid);
	}
	return pos;
}